import _thread
import urllib.request
import json


def tender(postData,delay):
	url = "http://zgf_queue.test/api/product/transfer"
	data = urllib.parse.urlencode(postData).encode(encoding='UTF8')
	response = urllib.request.urlopen(url,data)
	print(response.read())
try:
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":509},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":509},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":510},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":511},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":512},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":513},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":513},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":514},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":515},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":516},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":517},1))
	_thread.start_new_thread(tender,({"transfer_id":"37","tender_id":518},1))

except:
	print("Error: 无法启动线程")

while 1:
	pass